﻿using System;
using System.Collections.Generic;
using Minion.Web.Data;
using Minion.Web.Data.Service;

namespace Minion.Web.Root.Repositories.Concrete
{
    public class LocationRepository : ILocationRepository
    {
        private readonly ILocationService _locationService;

        public LocationRepository(ILocationService locService)
        {
            _locationService = locService;
        }

        public IList<Location> GetLocationDetails(double latitude, double longitude)
        {
            return _locationService.GetLocationDetails(latitude, longitude);

        }

        public void AddLocationItem(Location loc)
        {
            _locationService.AddLocationToDb(loc);
        }

        public IEnumerable<Location> GetAllLocationDetails()
        {
            return _locationService.GetAllLocations();
        }
    }
}